package crypto

import "hundsun.com/hsl/hschain/common/crypto/padding"

var options = Options{AsymmetricAlgorithm: "SM2", HashFamily: "SM3", SymmetricAlgorithm: "SM4", Padding: padding.CbcPatddingPkcs7()}

//Options crypto options
type Options struct {
	AsymmetricAlgorithm string //非对称算法, 可选：SM2, ECDSA
	HashFamily          string //hash算法，可选: SM3, MD5,SHA1,SHA224,SHA256,SHA384,SHA512
	SymmetricAlgorithm  string //对称加密算法, 可选:SM4, AES, AES256, AES192
	//SignAlgorithm       string          //签名算法
	Padding padding.Padding //填充算法, 实现了Padding接口的对象引用，其接口为Padding和UnPadding
}

//Option crypto options function type
/*
   配置参数函数，用于初始化函数Init的参数。例如把默认Hash改成SHA1:
	crypto.Init(func(opts *crypto.CryptoOptions) {
		opts.HashFamily = "SHA1"
	})
   其参数opts指向默认参数配置
*/
type Option func(c *Options)
